// var BASE_URL = "http://118.190.52.185:8080/";
var BASE_URL = "http://localhost:9999/";
var TOKEN = "";

var core = null;

window.initCommon = function(bui,filter) {

    core = bui;

    // console.log("token"+TOKEN);
    if(bui){
        var storage = bui.storage();
        var yhbm = storage.get("yhbm",0);
        bui.config.ajax = {
            headers: {
                token:storage.get("token",0)
            }
        };
    }
    if(filter != "0"){
        var yhbm = $$("yhbm");
        if(!yhbm || yhbm == ""){
            bui.load({ url: "../index.html"});
        }
    }

}

window.$$ = function(key) {
    if(core){
        var storage = bui.storage();
        return storage.get(key,0);
    }
    return "";
}

window.$$$ = function(value) {
    if(bui.typeof(value) == undefined || value == "undefined" || value == null ){
        return "";
    }
    return value;
}